package com.zxp.javaee.thread;

import lombok.Getter;
import lombok.Setter;
import lombok.extern.log4j.Log4j;
import lombok.extern.slf4j.Slf4j;
import org.apache.log4j.Logger;

/**
 * @author zxp
 * @date 2021/8/13 10:19
 */
@Slf4j
@Getter
@Setter
public class Thread01Runnable implements Runnable{

    private String name;

    public Thread01Runnable(String name) {
        this.name = name;
    }

    @Override
    public void run() {
        log.debug("当前线程名:{}, 线程对象：{}",Thread.currentThread().getName(),getName());
    }

    public static void main(String[] args) {
        Thread01Runnable thread01 = new Thread01Runnable("zxp");
        thread01.run();
    }
}
